local sk__yongjue = fk.CreateSkill {

  name = "sk__yongjue",

  tags = { Skill.Compulsory, },

}



sk__yongjue:addEffect(fk.DamageCaused, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(sk__yongjue.name) then
      return target == player and not data.chain and data.card and data.card.trueName == "slash"
    end
  end,
  on_use = function(self, event, target, player, data)
    data.damage = data.damage + 1
  end,
})
sk__yongjue:addEffect(fk.Death, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(sk__yongjue.name) then
      return data.damage and data.damage.from and data.damage.from == player and #player:getPile("sk__cunsi") > 0
    end
  end,
  on_use = function(self, event, target, player, data)
    player.room:moveCardTo(player:getPile("sk__cunsi"), Card.PlayerHand, player, fk.ReasonPrey, sk__yongjue.name, nil,
      false, player)
  end,
})

return sk__yongjue
